﻿using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp7
{
    class Program
    {
        static void Main(string[] args)
        {
            Queue tate = new Queue();

            tate.Enqueue("飘了");
            tate.Enqueue("膨胀了");
            tate.Enqueue("那很卡拉嫂！！！溜了 宿舍摊着了！！！");
            tate.Peek();
            //tate.Dequeue();
            object[] arr = tate.ToArray();  //将 Queue 实例中的元素复制到新数组
            foreach (var h in tate)
            {
                Console.WriteLine(h);
            }
            tate.Dequeue();
            IEnumerator enumerator = tate.GetEnumerator();   //返回循环访问枚举数
            while (enumerator.MoveNext())
            {
                Console.WriteLine(enumerator.Current);
            }
        }
    }
}
